package com.ysyx.ysyx_admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 地区表
 * @TableName area_inf
 */
@TableName(value ="area_inf")
@Data
public class AreaPojo implements Serializable {
    /**
     * 地区pk
     */
    @TableId(type = IdType.AUTO)
    private Integer areaId;

    /**
     * 地区名称
     */
    private String areaName;

    /**
     * 左上经度
     */
    private Double leftupLongitude;

    /**
     * 左上纬度
     */
    private Double leftupLatitude;

    /**
     * 右上经度
     */
    private Double rightupLongitude;

    /**
     * 右上纬度
     */
    private Double rightupLatitude;

    /**
     * 左下经度
     */
    private Double leftdownLongitude;

    /**
     * 左下纬度
     */
    private Double leftdownLatitude;

    /**
     * 右下经度
     */
    private Double rightdownLongitude;

    /**
     * 右下纬度
     */
    private Double rightdownLatitude;

    /**
     * 类型 1普通起始地区块 2终点范围地区
     */
    private Integer areaState;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AreaPojo other = (AreaPojo) that;
        return (this.getAreaId() == null ? other.getAreaId() == null : this.getAreaId().equals(other.getAreaId()))
            && (this.getAreaName() == null ? other.getAreaName() == null : this.getAreaName().equals(other.getAreaName()))
            && (this.getLeftupLongitude() == null ? other.getLeftupLongitude() == null : this.getLeftupLongitude().equals(other.getLeftupLongitude()))
            && (this.getLeftupLatitude() == null ? other.getLeftupLatitude() == null : this.getLeftupLatitude().equals(other.getLeftupLatitude()))
            && (this.getRightupLongitude() == null ? other.getRightupLongitude() == null : this.getRightupLongitude().equals(other.getRightupLongitude()))
            && (this.getRightupLatitude() == null ? other.getRightupLatitude() == null : this.getRightupLatitude().equals(other.getRightupLatitude()))
            && (this.getLeftdownLongitude() == null ? other.getLeftdownLongitude() == null : this.getLeftdownLongitude().equals(other.getLeftdownLongitude()))
            && (this.getLeftdownLatitude() == null ? other.getLeftdownLatitude() == null : this.getLeftdownLatitude().equals(other.getLeftdownLatitude()))
            && (this.getRightdownLongitude() == null ? other.getRightdownLongitude() == null : this.getRightdownLongitude().equals(other.getRightdownLongitude()))
            && (this.getRightdownLatitude() == null ? other.getRightdownLatitude() == null : this.getRightdownLatitude().equals(other.getRightdownLatitude()))
            && (this.getAreaState() == null ? other.getAreaState() == null : this.getAreaState().equals(other.getAreaState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAreaId() == null) ? 0 : getAreaId().hashCode());
        result = prime * result + ((getAreaName() == null) ? 0 : getAreaName().hashCode());
        result = prime * result + ((getLeftupLongitude() == null) ? 0 : getLeftupLongitude().hashCode());
        result = prime * result + ((getLeftupLatitude() == null) ? 0 : getLeftupLatitude().hashCode());
        result = prime * result + ((getRightupLongitude() == null) ? 0 : getRightupLongitude().hashCode());
        result = prime * result + ((getRightupLatitude() == null) ? 0 : getRightupLatitude().hashCode());
        result = prime * result + ((getLeftdownLongitude() == null) ? 0 : getLeftdownLongitude().hashCode());
        result = prime * result + ((getLeftdownLatitude() == null) ? 0 : getLeftdownLatitude().hashCode());
        result = prime * result + ((getRightdownLongitude() == null) ? 0 : getRightdownLongitude().hashCode());
        result = prime * result + ((getRightdownLatitude() == null) ? 0 : getRightdownLatitude().hashCode());
        result = prime * result + ((getAreaState() == null) ? 0 : getAreaState().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", areaId=").append(areaId);
        sb.append(", areaName=").append(areaName);
        sb.append(", leftupLongitude=").append(leftupLongitude);
        sb.append(", leftupLatitude=").append(leftupLatitude);
        sb.append(", rightupLongitude=").append(rightupLongitude);
        sb.append(", rightupLatitude=").append(rightupLatitude);
        sb.append(", leftdownLongitude=").append(leftdownLongitude);
        sb.append(", leftdownLatitude=").append(leftdownLatitude);
        sb.append(", rightdownLongitude=").append(rightdownLongitude);
        sb.append(", rightdownLatitude=").append(rightdownLatitude);
        sb.append(", areaState=").append(areaState);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}